import request from '@/utils/request'

export default {
    // 获取医院设置方法
    getHospSetList(current, limit, searchObj) {
        return request({
            url: `/admin/hosp/hospitalSet/findPage/${current}/${limit}`,
            method: 'post',
            data: searchObj  // 使用JSON类型数据传递
        })
    },
    // 删除医院方法
    delHospSet(id) {
        return request({
            url: `/admin/hosp/hospitalSet/${id}`,
            method: 'delete'
        })
    },
    // 批量删除医院设置方法
    batchDelHospSet(idList) {
        return request({
            url: `/admin/hosp/hospitalSet/batchRemove`,
            method: 'delete',
            data: idList    // JSON类型数据
        })
    },
    // 锁定和取消锁定的方法
    lockHospSet(id,status) {
        return request({
            url: `/admin/hosp/hospitalSet/lockHospSet/${id}/${status}`,
            method: 'put'
        })
    },
    // 添加医院设置
    saveHospSet(hospitalSet){
        return request({
            url: `/admin/hosp/hospitalSet/saveHospitalSet`,
            method: 'post',
            data:hospitalSet
        })
    },
    // 修改医院设置
    getHospSet(id){
        return request({
            url: `/admin/hosp/hospitalSet/getHospSet/${id}`,
            method: 'get'
        })
    },
    // 修改医院设置
    updateHospSet(hospitalSet){
        return request({
            url: `/admin/hosp/hospitalSet/updateHospSet`,
            method: 'put',
            data:hospitalSet
        })
    }

}